package com.project.school_flate.entity.com;

import com.mybatisflex.annotation.*;

import java.io.Serializable;
import java.util.List;

import com.mybatisflex.core.keygen.KeyGenerators;
import com.project.school_flate.entity.user.UserInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author 马维健
 * @since 2024/1/2
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "反馈")
@Table(value = "t_com_feedback")
public class ComFeedback implements Serializable {

    private static final long serialVersionUID = -6770073509593481811L;

    /**
     * 反馈ID
     */
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    @Schema(description = "反馈ID")
    private String id;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private String userId;

    /**
     * 用户信息
     */
    @Column(ignore = true)
    @RelationOneToOne(selfField = "userId",targetField = "id")
    @Schema(title = "用户信息",name = "userInfo",type = "userInfo")
    private UserInfo userInfo;

    /**
     * 图片
     */
    @Schema(description = "图片")
    private String image;

    /**
     * 图片URL
     */
    @Column(ignore = true)
    @RelationOneToMany(selfField = "image",targetField = "id",selfValueSplitBy = ",")
    @Schema(description = "图片URL")
    private List<ComFileDetail> imageUrlList;

    /**
     * 描述
     */
    @Schema(description = "描述")
    private String describe;

}
